import javax.swing.text.html.HTML.Tag;

public class googlePat extends IProvider {
	public googlePat(BotConfig cfg){
		super(cfg);
		_posCntSD = new SearchDetails(".*Patents (.*) - (.*) on .*",
				2, null, Tag.TD);
	}
	
	private SearchDetails _posCntSD = null;
	@Override
	protected SearchDetails getPositionCountSearch(){
		return _posCntSD;
	}
	
	@Override
	protected String getEnginName() {
		return "google-patents";
	}
	@Override
	protected String getSearchURL(int Year, String useCase, String categ) {		
		String patUrl ="http://www.google.com/patents?num=100&as_epq=" + categ;
		if(useCase.length() > 0)
			patUrl += "&as_oq=" + useCase.replace('|', '+');
		patUrl += "&as_drrb_is=b&as_minm_is=0&as_miny_is=" + Integer.toString(Year) +
		"&as_maxm_is=0&as_maxy_is=" + Integer.toString(Year) +
		"&start=100000";
		return patUrl;
	}
	
	@Override
	protected String getURL(String extUrl){
		return extUrl;
	}
	
	
	@Override
	protected SearchDetails getKeySearchDetails(int idx) {
		return null;
	}
	@Override
	protected int getKeyWordCount() {
		return 0;
	}
	@Override
	protected String getKeyWordName(int idx) {
		return null;
	}
}
